3.352 \(\int \frac{x^2 \log (x)}{a+b x+c x^2} \, dx\)

Optimal. Leaf size=234 \[ -\frac{\left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \text{PolyLog}\left (2,-\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 c^2}-\frac{\left (\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}+b\right ) \text{PolyLog}\left (2,-\frac{2 c x}{\sqrt{b^2-4 a c}+b}\right )}{2 c^2}-\frac{\log (x) \left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \log \left (\frac{2 c x}{b-\sqrt{b^2-4 a c}}+1\right )}{2 c^2}-\frac{\log (x) \left (\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}+b\right ) \log \left (\frac{2 c x}{\sqrt{b^2-4 a c}+b}+1\right )}{2 c^2}-\frac{x}{c}+\frac{x \log (x)}{c} \]

[Out]

-(x/c) + (x*Log[x])/c - ((b - (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*Log[x]*Log[1 + (2*c*x)/(b - Sqrt[b^2 - 4*a*c])]
)/(2*c^2) - ((b + (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*Log[x]*Log[1 + (2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(2*c^2) -
((b - (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*PolyLog[2, (-2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(2*c^2) - ((b + (b^2 - 2*
a*c)/Sqrt[b^2 - 4*a*c])*PolyLog[2, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(2*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.355269, antiderivative size = 234, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2357, 2295, 2317, 2391} \[ -\frac{\left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \text{PolyLog}\left (2,-\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 c^2}-\frac{\left (\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}+b\right ) \text{PolyLog}\left (2,-\frac{2 c x}{\sqrt{b^2-4 a c}+b}\right )}{2 c^2}-\frac{\log (x) \left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \log \left (\frac{2 c x}{b-\sqrt{b^2-4 a c}}+1\right )}{2 c^2}-\frac{\log (x) \left (\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}+b\right ) \log \left (\frac{2 c x}{\sqrt{b^2-4 a c}+b}+1\right )}{2 c^2}-\frac{x}{c}+\frac{x \log (x)}{c} \]

Antiderivative was successfully verified.

[In]

Int[(x^2*Log[x])/(a + b*x + c*x^2),x]

[Out]

-(x/c) + (x*Log[x])/c - ((b - (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*Log[x]*Log[1 + (2*c*x)/(b - Sqrt[b^2 - 4*a*c])]
)/(2*c^2) - ((b + (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*Log[x]*Log[1 + (2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(2*c^2) -
((b - (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*PolyLog[2, (-2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(2*c^2) - ((b + (b^2 - 2*
a*c)/Sqrt[b^2 - 4*a*c])*PolyLog[2, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(2*c^2)

Rule 2357

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{x^2 \log (x)}{a+b x+c x^2} \, dx &=\int \left (\frac{\log (x)}{c}-\frac{(a+b x) \log (x)}{c \left (a+b x+c x^2\right )}\right ) \, dx\\ &=\frac{\int \log (x) \, dx}{c}-\frac{\int \frac{(a+b x) \log (x)}{a+b x+c x^2} \, dx}{c}\\ &=-\frac{x}{c}+\frac{x \log (x)}{c}-\frac{\int \left (\frac{\left (b+\frac{-b^2+2 a c}{\sqrt{b^2-4 a c}}\right ) \log (x)}{b-\sqrt{b^2-4 a c}+2 c x}+\frac{\left (b-\frac{-b^2+2 a c}{\sqrt{b^2-4 a c}}\right ) \log (x)}{b+\sqrt{b^2-4 a c}+2 c x}\right ) \, dx}{c}\\ &=-\frac{x}{c}+\frac{x \log (x)}{c}-\frac{\left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \int \frac{\log (x)}{b-\sqrt{b^2-4 a c}+2 c x} \, dx}{c}-\frac{\left (b+\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \int \frac{\log (x)}{b+\sqrt{b^2-4 a c}+2 c x} \, dx}{c}\\ &=-\frac{x}{c}+\frac{x \log (x)}{c}-\frac{\left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \log (x) \log \left (1+\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 c^2}-\frac{\left (b+\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \log (x) \log \left (1+\frac{2 c x}{b+\sqrt{b^2-4 a c}}\right )}{2 c^2}+\frac{\left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \int \frac{\log \left (1+\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{x} \, dx}{2 c^2}+\frac{\left (b+\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \int \frac{\log \left (1+\frac{2 c x}{b+\sqrt{b^2-4 a c}}\right )}{x} \, dx}{2 c^2}\\ &=-\frac{x}{c}+\frac{x \log (x)}{c}-\frac{\left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \log (x) \log \left (1+\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 c^2}-\frac{\left (b+\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \log (x) \log \left (1+\frac{2 c x}{b+\sqrt{b^2-4 a c}}\right )}{2 c^2}-\frac{\left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \text{Li}_2\left (-\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 c^2}-\frac{\left (b+\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \text{Li}_2\left (-\frac{2 c x}{b+\sqrt{b^2-4 a c}}\right )}{2 c^2}\\ \end{align*}

Mathematica [A]  time = 0.255355, size = 434, normalized size = 1.85 \[ -\frac{b \left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \text{PolyLog}\left (2,-\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 c^2}-\frac{b \left (\frac{b}{\sqrt{b^2-4 a c}}+1\right ) \text{PolyLog}\left (2,-\frac{2 c x}{\sqrt{b^2-4 a c}+b}\right )}{2 c^2}-\frac{a \text{PolyLog}\left (2,-\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{c \sqrt{b^2-4 a c}}+\frac{a \text{PolyLog}\left (2,-\frac{2 c x}{\sqrt{b^2-4 a c}+b}\right )}{c \sqrt{b^2-4 a c}}-\frac{b \log (x) \left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \log \left (\frac{-\sqrt{b^2-4 a c}+b+2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 c^2}-\frac{b \log (x) \left (\frac{b}{\sqrt{b^2-4 a c}}+1\right ) \log \left (\frac{\sqrt{b^2-4 a c}+b+2 c x}{\sqrt{b^2-4 a c}+b}\right )}{2 c^2}-\frac{a \log (x) \log \left (\frac{-\sqrt{b^2-4 a c}+b+2 c x}{b-\sqrt{b^2-4 a c}}\right )}{c \sqrt{b^2-4 a c}}+\frac{a \log (x) \log \left (\frac{\sqrt{b^2-4 a c}+b+2 c x}{\sqrt{b^2-4 a c}+b}\right )}{c \sqrt{b^2-4 a c}}-\frac{x}{c}+\frac{x \log (x)}{c} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^2*Log[x])/(a + b*x + c*x^2),x]

[Out]

-(x/c) + (x*Log[x])/c - (a*Log[x]*Log[(b - Sqrt[b^2 - 4*a*c] + 2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(c*Sqrt[b^2 -
4*a*c]) - (b*(1 - b/Sqrt[b^2 - 4*a*c])*Log[x]*Log[(b - Sqrt[b^2 - 4*a*c] + 2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(2
*c^2) + (a*Log[x]*Log[(b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(c*Sqrt[b^2 - 4*a*c]) - (b*(1
+ b/Sqrt[b^2 - 4*a*c])*Log[x]*Log[(b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(2*c^2) - (a*PolyL
og[2, (-2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(c*Sqrt[b^2 - 4*a*c]) - (b*(1 - b/Sqrt[b^2 - 4*a*c])*PolyLog[2, (-2*c
*x)/(b - Sqrt[b^2 - 4*a*c])])/(2*c^2) + (a*PolyLog[2, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(c*Sqrt[b^2 - 4*a*c])
 - (b*(1 + b/Sqrt[b^2 - 4*a*c])*PolyLog[2, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(2*c^2)

________________________________________________________________________________________

Maple [B]  time = 0.063, size = 593, normalized size = 2.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*ln(x)/(c*x^2+b*x+a),x)

[Out]

x*ln(x)/c-x/c-1/2/c^2*ln(x)*ln((-2*c*x+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))*b-1/c*ln(x)/(-4*a*c+b^2)
^(1/2)*ln((-2*c*x+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))*a+1/2/c^2*ln(x)/(-4*a*c+b^2)^(1/2)*ln((-2*c*x
+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))*b^2-1/2/c^2*ln(x)*ln((2*c*x+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b
^2)^(1/2)))*b+1/c*ln(x)/(-4*a*c+b^2)^(1/2)*ln((2*c*x+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2)))*a-1/2/c^2*l
n(x)/(-4*a*c+b^2)^(1/2)*ln((2*c*x+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2)))*b^2-1/2/c^2*dilog((-2*c*x+(-4*
a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))*b-1/c/(-4*a*c+b^2)^(1/2)*dilog((-2*c*x+(-4*a*c+b^2)^(1/2)-b)/(-b+(-
4*a*c+b^2)^(1/2)))*a+1/2/c^2/(-4*a*c+b^2)^(1/2)*dilog((-2*c*x+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))*b
^2-1/2/c^2*dilog((2*c*x+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2)))*b+1/c/(-4*a*c+b^2)^(1/2)*dilog((2*c*x+(-
4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2)))*a-1/2/c^2/(-4*a*c+b^2)^(1/2)*dilog((2*c*x+(-4*a*c+b^2)^(1/2)+b)/(b
+(-4*a*c+b^2)^(1/2)))*b^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*log(x)/(c*x^2+b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{x^{2} \log \left (x\right )}{c x^{2} + b x + a}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*log(x)/(c*x^2+b*x+a),x, algorithm="fricas")

[Out]

integral(x^2*log(x)/(c*x^2 + b*x + a), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*ln(x)/(c*x**2+b*x+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2} \log \left (x\right )}{c x^{2} + b x + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*log(x)/(c*x^2+b*x+a),x, algorithm="giac")

[Out]

integrate(x^2*log(x)/(c*x^2 + b*x + a), x)